package text;

import java.text.MessageFormat;

public class texttime {
    public static void main(String[] args) {
        String dateTime = MessageFormat.format(
                "{0,date,yyyy-MM-dd-HH-mm:ss:ms}",
                new Object[] { new java.sql.Date(System.currentTimeMillis()) });
        System.out.println("this is Message datetime :" + dateTime);


    }
}
